package opencascade;

/**
 *  Describes functions to build evolved shapes.
 *  An evolved shape is built from a planar spine (face or
 *  wire) and a profile (wire). The evolved shape is the
 *  unlooped sweep (pipe) of the profile along the spine.
 *  Self-intersections are removed.
 *  A MakeEvolved object provides a framework for:
 *  - defining the construction of an evolved shape,
 *  - implementing the construction algorithm, and
 *  - consulting the result.
 *  Computes an Evolved by
 *  1 - sweeping a profil along a spine.
 *  2 - removing the self-intersections.
 * 
 *  The profile is defined in a Referential R. The position of
 *  the profile at the current point of the  spine is given by
 *  confusing R  and the local  referential given by (  D0, D1
 *  and the normal of the Spine)
 * 
 *  If the Boolean <AxeProf> is  true, R is  O,X,Y,Z
 *  else R is defined as the local refential at the nearest
 *  point of the profil to the spine.
 * 
 *  if <Solid> is TRUE the Shape result  is completed to be a
 *  solid or a compound of solids.
 */
public class BRepOffsetAPI_MakeEvolved extends BRepBuilderAPI_MakeShape {

  private long swigCPtr;
  BRepOffsetAPI_MakeEvolved(long cPtr, boolean cMemoryOwn) 
  {
    super(OCCwrapJavaJNI.BRepOffsetAPI_MakeEvolved_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  BRepOffsetAPI_MakeEvolved(long cPtr, boolean cMemoryOwn, Object Parent) 
  {
    super(OCCwrapJavaJNI.BRepOffsetAPI_MakeEvolved_SWIGUpcast(cPtr), cMemoryOwn, Parent);
    swigCPtr = cPtr;
  }

  static long getCPtr(BRepOffsetAPI_MakeEvolved obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }
  
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        OCCwrapJavaJNI.delete_BRepOffsetAPI_MakeEvolved(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public BRepOffsetAPI_MakeEvolved() {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_0(), true);
  }

  public BRepOffsetAPI_MakeEvolved( TopoDS_Wire  Spine,  TopoDS_Wire  Profil, GeomAbs_JoinType Join, long AxeProf, long Solid, long ProfOnSpine, double Tol) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_1(TopoDS_Wire.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil, Join.swigValue(), AxeProf, Solid, ProfOnSpine, Tol), true);
  }

  /**
   *  These constructors construct an evolved shape by sweeping the profile
   *  Profile along the spine Spine.
   *  The profile is defined in a coordinate system R.
   *  The coordinate system is determined by AxeProf:
   *  - if AxeProf is true, R is the global coordinate system,
   *  - if AxeProf is false, R is computed so that:
   *  - its origin is given by the point on the spine which is
   *  closest to the profile,
   *  - its "X Axis" is given by the tangent to the spine at this point, and
   *  - its "Z Axis" is the normal to the plane which contains the spine.
   *  The position of the profile at the current point of the
   *  spine is given by making R coincident with the local
   *  coordinate system given by the current point, the
   *  tangent vector and the normal to the spine.
   *  Join defines the type of pipe generated by the salient
   *  vertices of the spine. The default type is GeomAbs_Arc
   *  where the vertices generate revolved pipes about the
   *  axis passing along the vertex and the normal to the
   *  plane of the spine. At present, this is the only
   *  construction type implemented.
   */
  public BRepOffsetAPI_MakeEvolved( TopoDS_Wire  Spine,  TopoDS_Wire  Profil, GeomAbs_JoinType Join, long AxeProf, long Solid, long ProfOnSpine) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_2(TopoDS_Wire.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil, Join.swigValue(), AxeProf, Solid, ProfOnSpine), true);
  }

  public BRepOffsetAPI_MakeEvolved( TopoDS_Wire  Spine,  TopoDS_Wire  Profil, GeomAbs_JoinType Join, long AxeProf, long Solid) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_3(TopoDS_Wire.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil, Join.swigValue(), AxeProf, Solid), true);
  }

  public BRepOffsetAPI_MakeEvolved( TopoDS_Wire  Spine,  TopoDS_Wire  Profil, GeomAbs_JoinType Join, long AxeProf) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_4(TopoDS_Wire.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil, Join.swigValue(), AxeProf), true);
  }

  public BRepOffsetAPI_MakeEvolved( TopoDS_Wire  Spine,  TopoDS_Wire  Profil, GeomAbs_JoinType Join) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_5(TopoDS_Wire.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil, Join.swigValue()), true);
  }

  public BRepOffsetAPI_MakeEvolved( TopoDS_Wire  Spine,  TopoDS_Wire  Profil) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_6(TopoDS_Wire.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil), true);
  }

  public BRepOffsetAPI_MakeEvolved( TopoDS_Face  Spine,  TopoDS_Wire  Profil, GeomAbs_JoinType Join, long AxeProf, long Solid, long ProfOnSpine, double Tol) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_7(TopoDS_Face.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil, Join.swigValue(), AxeProf, Solid, ProfOnSpine, Tol), true);
  }

  public BRepOffsetAPI_MakeEvolved( TopoDS_Face  Spine,  TopoDS_Wire  Profil, GeomAbs_JoinType Join, long AxeProf, long Solid, long ProfOnSpine) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_8(TopoDS_Face.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil, Join.swigValue(), AxeProf, Solid, ProfOnSpine), true);
  }

  public BRepOffsetAPI_MakeEvolved( TopoDS_Face  Spine,  TopoDS_Wire  Profil, GeomAbs_JoinType Join, long AxeProf, long Solid) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_9(TopoDS_Face.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil, Join.swigValue(), AxeProf, Solid), true);
  }

  public BRepOffsetAPI_MakeEvolved( TopoDS_Face  Spine,  TopoDS_Wire  Profil, GeomAbs_JoinType Join, long AxeProf) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_10(TopoDS_Face.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil, Join.swigValue(), AxeProf), true);
  }

  public BRepOffsetAPI_MakeEvolved( TopoDS_Face  Spine,  TopoDS_Wire  Profil, GeomAbs_JoinType Join) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_11(TopoDS_Face.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil, Join.swigValue()), true);
  }

  public BRepOffsetAPI_MakeEvolved( TopoDS_Face  Spine,  TopoDS_Wire  Profil) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeEvolved__SWIG_12(TopoDS_Face.getCPtr(Spine), Spine, TopoDS_Wire.getCPtr(Profil), Profil), true);
  }

  public  BRepFill_Evolved  Evolved() {
    BRepFill_Evolved ret = new BRepFill_Evolved(OCCwrapJavaJNI.BRepOffsetAPI_MakeEvolved_Evolved(swigCPtr, this), false, this);
    return ret;
  }

  /**
   *  Returns   the  shapes  created  from   a  subshape
   *  <SpineShape>  of     the  spine   and   a subshape
   *  <ProfShape> on the profile.
   */
  public  TopTools_ListOfShape  GeneratedShapes( TopoDS_Shape  SpineShape,  TopoDS_Shape  ProfShape) {
    TopTools_ListOfShape ret = new TopTools_ListOfShape(OCCwrapJavaJNI.BRepOffsetAPI_MakeEvolved_GeneratedShapes(swigCPtr, this, TopoDS_Shape.getCPtr(SpineShape), SpineShape, TopoDS_Shape.getCPtr(ProfShape), ProfShape), false, this);
    return ret;
  }

  /**
   *  Return the face Top if <Solid> is True in the constructor.
   */
  public  TopoDS_Shape  Top() {
    TopoDS_Shape ret = new TopoDS_Shape(OCCwrapJavaJNI.BRepOffsetAPI_MakeEvolved_Top(swigCPtr, this), true);
    return ret;
  }

  /**
   *  Return the face Bottom  if <Solid> is True in the constructor.
   */
  public  TopoDS_Shape  Bottom() {
    TopoDS_Shape ret = new TopoDS_Shape(OCCwrapJavaJNI.BRepOffsetAPI_MakeEvolved_Bottom(swigCPtr, this), true);
    return ret;
  }

}
